Don't throw a fatal, if is_file() parameter isn't a 'valid path', but only a data/base64-string.

Related to #4283

Still wondering, how a path can't be a string …

@tanghus @icewind1991 @bartv2