There are so many details missing that might be helpful. Adding directionality is fine, but then there can be reflections. A detector does not require directionality from dark masks, etc., if it is properly designed and operates within its expected limitations.
Are you using modulated IR, as is incorporated in many devices, or is it just an IRED and detector? What range do you need? Are you trying to detect an object or send data? If detection, are you using reflection or beam break?
John