Cordova File unit tests & mock object cleanup.

1. Added some unit tests for $cordovaFile.
2. Added missing methods to $cordovaFile mock object so that the method signatures match the real object.
3. Refactored some duplicate code in the $cordovaFile mock object.