Fix check for empty path component in InfdFilesystemStorage

Thanks to Jann Horn for reporting this. At the moment I don't think there
are any security implications because of this.