Handle errors in commands

Some errors were swallowed entirely, some didn't print the error
message.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Restore sorting of ls output

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Merge pull request #97 from bfirsh/cli-regressions

Fix CLI regressions