extract AuthTokenFile domain object

This refactor centralizes the logic around reading/writing the authentication token file.

It is primarily intended to clean up the code in preparation for XDG standard directory support
This doesn't work on ruby 1.8, or on the standalone script version used by Homebrew. (see `rake standalone`)