Avoid calling unrelated tramp when revert buffers

file-readable-p calls tramp, so check if it is in repository first.
Fix file expansion bug in Windows.

On windows if I don't expand the file name here then the 'equal later compares '/' and '\' path seps, failing.