Fixes bbatsov/prelude#528

Fixes https://github.com/bbatsov/prelude/issues/528

I got the fix from here: http://www.emacswiki.org/emacs/RecentFiles, checkout the section called TrampMode