Fixed directory permissions bug

Changed all to builder.addFile to ensure parent directories are not automatically added as this results in incorrect permissions being applied.