Fix tests on vagrant shared folder.

Fixes #111.

It would be good to also have instructions on how to run the tests so that the temporary directory isn't a vagrant shared folder, but I'm not sure how to tell tox to put the temporary directory somewhere other than `.tox`.
@wallrj has mentioned https://docs.python.org/2/library/os.html#open-flag-constants and this could make the test more readable