Better output path detection during unit tests