Make the pwd hack work in cygwin environment