Pyfilesystem support+refactor

This corresponds to a PR in XBlock which adds file system support, and is a refactor of the XBlock codebase as per a longer discussion with Cale. This adds test cases for the XBlock refactor. @cpennington Mind giving a quick review? If it's on the right track, I'll add a second reviewer. 
with-statements would be cool.