add optional kwargs to rsa export key, and fix some pep8 warnings