GetEmitOutput function and testfiles

Why is the parameter changed to function instead? We earlier had this as a function but decided it was better to just give the current directory since anyways currentDirectory should be cached so it is just a single call to sys anyways.