Fix bug related to python3

In python3 the xrange function has been removed, and range returns
an iterator like xrange did. I added six to the requirements and
used its xrange utility to fill in for the missing function.
Style tweaks
Remove dependncy on six
remove spaces
Merge pull request #69 from voidfiles/master

Fix bug related to python3 (Thanks @voidfiles)