handle 302 responses in get_dir_contents requests
Add test for pull request #174
Merge branch 'topic/HttpRedirect' into develop
Fix pep8 and copyrights