FIX: [linux] fix & optimize input device checking

This:
1) Fixes the mixup between device name and filename when checking if a device is already in the map
2) Do a stat on the filename rather than directly trying to open it when checking presence