Specs no longer use "echo -n" as a test shell command

The -n option to echo is only supported by certain shells (e.g. bash) and as a result the tests can fail on certain platforms - OSX being one example. This removes the use of the -n option and adjusts expected output values accordingly.
Merge pull request #572 from tleach/mac-specs

Specs no longer use "echo -n" as a test shell command