changed mkdir to makedirs