Fixed dir init and connection state.
Merge branch 'master' of github.com:stchris/books