Redone py.test integration to be less intrusive and work with xdist.