Increase control on data printed

maas has some particular requirements regarding the output. This
commit attempts to address the following:

Report an error if the script attempts to return more than 10 metrics.
Catch all unhandled exceptions and strip newlines before printing
output.
Make sure the error status message is printed if one is generated -
if a status okay message was already printed the error message would
not override it in maas.