Fix references to pyvirtualfs modules
Add build directory to ignored directories for py.test
Move main functionality into a dedicated function to make pkg_resources happy