make sure that directory exists when files are moved