Use getcwd() because it works under MSYS but `pwd` doesn't.