Added File.numpages (instance method) helper and refactored test cases.