Check if a random "file" is really a device file, and treat it