Added check to see if options are available before using it in writeFile

Commit https://github.com/driftyco/ng-cordova/issues/325 did not check if options was present. 
This PR makes options optional(and prevents existing apps without options to break).