Only do file checks on UNIX based operating systems

Block devices are not files on win32