Fixed autojoin bugs and changed the file scheme to use json; implemented documented docopt stuff (resolves #6)