and replaced the use of system() (and resulting security implications).
with tweaks from Mike Frysinger and Rob Landley. Note: this will still fail to umount a path that contains an ' or \ character. Is it worth the extra size to filter for that?