Fixed broken tests and added new method that get a resource as a file
Object.