Got rid of depricated gui functions, should work on os x and linux now

I have been working in windows so os.getcwd output differs from the
linux or os x outputs