Adds compatibility to exception handling

This changes all instances of the phrase "Exception, error" to
"Exception as error" for py3 compatibility.
Imports unicode_literals from __future__

Adds py2 unicode compatibility to py3.
tar.py: Changes permissions integer to octal
Adds unicode compatibility support

Ensures that the necessary strings that need to be unicode, stay
unicode in both py2 and py3 when running layman.

dbbase.py: Adds py2/py3 unicode compatibility when writing to ElementTree.
{api, cli, output, version}.py: Updates print() functions

{api, output}.py: Imports print_function from future to allow
file= syntax for print functions.
{argsparser, dbbase}.py: Adds py3 keys() compatibility
dbbase.py: Fixes implicit tuple unpacking

A temporary variable is assigned to fix the lack of implicit tuple
unpacking in py3.
makeconf.py: Implements cmp_to_key on prio_sort

To ensure py2/py3 compat, the cmp_to_key function has been used to
the convert the variable prio_sort to a key instead of a comparison
like py3 returns prio_sort to be.
config.py: Adds py3 configparser support
api.py: Corrects output of repos

Due to repos coming in as a byte string, it needed to be converted
to a normal string before joining it in the debug message or it will
cause runtime failures. A check to see if the repos variable is an
instance of type str instead of type basestring which is no longer
available in py3.
output.py: Adds file output compatibility

In order to allow users to set the output for error and normal
output we need to check to see if users have set the output to be
of type file. In py2 this is specified by the variable "file",
however in py3 this is specified by io.IOBase which encompasses
all file types such as Raw, Text, and Buffered files.
utils.py: Adds str type checking for path_elements
cli.py: Adds byte array support

When checking the selection of which servers to sync/add there is
a check to see if 'ALL' is specified. In py2 with argparser this
works, but with py3 and argparser, this doesn't work because the
'ALL' string will come in as a bytearray. This commit fixes that
by checking the python version and assigning a varaible to be checked
instead of a simple string like 'ALL'. It will now come in as either
'ALL' or b'ALL', py version dependent. A small fix is also made to
docstring to make the print function py3 compatibile.
Merge pull request #2 from twitch153/py3_compat

Py3 compatibility