Correctly check getFileURLFromSystemPath() success

Change-Id: Iadc34171235fec2d6aafd601f62a0bff8ed5b3ee
Reviewed-on: https://gerrit.libreoffice.org/6770
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>