BUG: changed string.lowercase to string.ascii_lowercase

Compatibility with Python3, which dosn't have string.lowercase.
Merge pull request #3972 from juliantaylor/py3-fix

Backport PR #3971 to 1.7.x