GPH have an auto mounter, but the autodismount doesn't always work (eg. if a dir on the sd is in use when the dismount occurs). For some reason, the automounter manages to mount the image twice after that occurs, and the SD is never checked again - the only thing you can do is reboot.
All you can do is make sure you cd out of the /mnt/sd directory before removing the card. I do this by using the command line via a serial lead, so I'm never cd'd into the sd directory, I run everything from /usr/gp2x (eg. like "/mnt/sd/myapp" and never use relative paths in my apps)