fixed issue where getcwd() is unreliable when running under mod_perl