Also check if we have a valid path in write_to_file

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
[usb-moded] Release 0.71

  * Avoid crash when passing empty text/non valid data to write_to_file
  * Make usb-moded to start a bit earlier in bootup.
  * Update documentation for kernel command line ip.
  * No disconnects between devicelock status changes

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>