Fixed paths for all command line scripts.

Scripts now have sys.path.append("..") hack at the top to give them
access to code in the app directory, mainly app.models for the
database and app.environment for access to the lib folder.