Add bucket-type test for list-keys, fix bug in resources.py
Cleanup pep8 warnings