This reverts commit 032c50b.
We needed sudo for apt-get, but I now see this can be done differently. See http://docs.travis-ci.com/user/migrating-from-legacy
When looking for version and history files, we look in the current directory and its sub directories, and not in the repository root. After making a tag checkout, we change directory to the same relative path that we were in before. You can use this when you want to release a Python package that is in a sub directory of the repository. When we detect this, we first offer to change to the root directory of the repository.
This partially undoes 5697f80. If you use splitlines and then write the result back, you miss the last line ending.