made get_document() takes flags, null_on_failure, and user_preferences_dir
Merge branch 'master' of github.com:frogatto/frogatto