fixed order of directoryExists / fileExists expected/actual
remove trailing slashes from outputDirectory