Minor refactor of PR #233

OS won't change mid-execution, so lets avoid the unnecessary check each time `unixFilter` is run.