Recursively process subfolders also when used as imported module

In commit 5624b71 the command line argument handling was modified
to recursively add files from subfolders passed as arguments.

However the same functionality was not added for the case that
the pep257.py module is imported and the check_files method is
used, for example:

 import pep257
 errors = pep257.check_files(["file1.py", "folder"])

Refactor the previous change so that the recursive subfolder
handling is used in both cases.

Change-Id: I05f772916cdaff5fd7d2a00fcbbe69b1ea0ab79a
Use file's basename when checking if it's a test file

If the script is invoked with a folder name in the arguments,
for example:

 ./pep257.py folder

Then the list of files generated contains filenames prefixed
with the folder name, for example:

 folder/file1.py
 folder/file2.py
 folder/test_file1.py

This causes the check `filename.startswith("_test")` to always
return False, and test files are not properly handled.

Use `os.path.basename` to strip off any leading folder names
before checking if the file is a test file.

Change-Id: I05ccb1c168eb70ab75c8c28506ce198848355097
Make os and os.path imports a bit more readable

Repeating the os.path. prefix on all the method calls makes
the lines long and less easy to read.

Import only the specific methods that are needed.

Change-Id: Ib6cce24213e282f2364806f70ada69f0f3c82a16
Expand filenames to the full absolute path

Filenames are displayed on the output with relative path, for
example:

 ./pep257.py ../../folder

results in output like:

 ../../folder/file1.py: error message
 ../../folder/file2.py: error message

When building the list of files to process, expand the filenames
to the full absolute path, so the error messages are displayed
like:

 /home/user/folder/file1.py: error message
 /home/user/folder/file2.py: error message

Also make sure the ~ character is expanded to the name of the
user's home folder.

Change-Id: Ic93fb5478182d512a97f2957dba24ae3221cfce0
Handle error when file tokenization fails

If the script is run on a file that causes a token parsing
error, it will exit with a Python backtrace.

Catch the TokenError and print an error message to stderr.

Change-Id: I4ba3b0f7d095d3c03bb824fa64fd5d10a2a41e93
Merge pull request #34 from dpursehouse/more-updates

More updates
Bump version to 0.2.2

Change-Id: I27e3344ae197a1473cd59363318ce1155bb4f925
Merge pull request #35 from dpursehouse/bump-to-version-0.2.2

Bump version to 0.2.2