Remove stray new line that appears in output
Fix sample execution flag

I assume "-d" was how the script used to want database name to be passed in which is now "-n"
Use stderr and proper exit codes

Print errors to stderr instead of to stdout and exit with status code 1 when an error is encountered.
Fix result whitespace output

Previously, an extraneous newline appeared before the result line, even if no output preceded it. Also, the result did not end with a new line so the shell prompt got indented.
Fix stderr/exit change
Style consistency

Added in some whitespace to match existing style
Merge pull request #63 from rausanka/cli-cleanup

Cli cleanup