Split CLI from upload code.

This is the first step in making amus available both on the command line and in python code. You should be able to import amus and use upload_file in regular old python code now.