add option to log application error's

also get the tests working again
add optional message
Merge pull request #20 from tidepool-org/jhbate/app-errors

add option to log application error's