Some robustification with server and new versions. Committing now, but
going to rewrite quite a bit to make them more solid.
Major rewrite of the stimdb module. Added a few private helper functions
to check the existence of various components and assert their truth,
used in the preamble to pretty much every function. Rewrote the sync
function to use rsync instead of shutil.copy*. I was having issues with
both copy and copy2 not playing nicely with the SMB server, so I now use
subprocess.Popen to just run rsync. Seems to work fine, but I haven't
checked sync-ing up, only down. Also changed the call signatures of
everything to pass a string 'local' or 'remote' to denote which
database to query, rather than a boolean (local=True).