Some directory wrangling