Remove dependencies on pep8, pyflakes and flake8

They should be determined by the hacking dependency
implicitely.

Change-Id: I137feb8f44349be1bfb810b93f1f10bbdaf150e2
Refactor environment functions in preparation for get_file

These functions have been reorganised to break out functions that
deal with only file or URL handling to allow for better unit testing
and to prepare for get_file which will also use some of these functions.

Change-Id: I8576d09c556fc0835004da6b78070686482361e0
Merge "Remove dependencies on pep8, pyflakes and flake8"
Merge "Refactor environment functions in preparation for get_file"