fixing bug where linter would break when passed a directory instead of file