Fixes for the unix version of _bgetcmd

The `_bgetcmd` function was failing under extremely common circumstances under Linux.  Specifically, it would never capture the actual executable name (it was starting with the first argument).  Additionally, it now properly quotes arguments with spaces when reconstructing the command line.