Guard against arrays being passed to is_file, fixes #1627