Fix device bug

Fixed a bug where, theoretically, a file on a different device with the
same inode could be considered a link and removed.