Move tests for Spec.check() from old tests
Add some tests for PathSpec, fix the class bugs