use `os.getcwd` instead of `checkoutput('pwd', shell=True)`

This, presumably, makes the prompt faster since it directly get the
current working directory, rather than creating a shell, running pwd,
and reporting the result.