Done:
http://sourceforge.net/p/motsognir/code/HEAD/tree/trunk/
("Download snapshot")
This latest version should solve both your troubles:
- it makes gophermaps resolve relative paths to dynamic subgophermap
(ie. you can use now =./script.php entries in your gophermaps)
- when executing a CGI/PHP script, it makes sure to set the 'working
directory' to either where the parent gophermap is (if called from
within a gophermap), or where the script itself is.
I hope you will find these changes useful.
cheers,
Mateusz