Create the base directory name when starting up if it doesn't already exist.

There's a bunch of functionalization of some procedures that were
running here in order to get this to work cleanly and easily, which I
think on the whole will make the whole thing a little bit more
maintainable.

Add .gitignore for .swp files.