Fix permissions for target directory