Fixed directory not being created.