GetEmitOutput function and testfiles

`sourcePathComponents`