use db.query (redmine #1669)
check exit code of model execution (GH #112)

This only works for local/remote jobs, not for qsub.
print message if model finished ok (GH #112)
moving transformstats function to separate file

primarily to make it easier to reference
Create transformstats.R
tweaks to dump script

allow to specify defaults
disable output if run non-interactive
set default level to 3
Merge branch 'master' of github.com:PecanProject/pecan
fixes to dump script

allow PG_OPT to be null
check for interactive using tty
Merge branch 'master' of https://github.com/PecanProject/pecan