Fixed invalid path on startup err in 3 out of 4 test cases

See commit message for details on the test cases.