Implement basename in shell

This is simple enough to warrant a re-implementation to avoid spawning
subprocesses.

Signed-off-by: martin f. krafft <madduck@madduck.net>
Remove extraneous space

Signed-off-by: martin f. krafft <madduck@madduck.net>
Merge remote-tracking branch 'madduck/shell-improvements'
Improve basename()