Remove some unnecessary usage of Dir[]