Fix the file plugin to expand the ~

Update the setup.py to use the number of git revisions to determine
the last digit of the version.

Added a test for the file: plugin.