make dir func handle spaces