Replace heavyweight use of python with a simple 'pwd' call