Fix assignment to free variable warning
Restore compatibility with stable Emacs 24.2

Compatibility was broken by the following comments which introduced
`user-error` to the code base which is only available from Emacs 24.2.50
onwards.

cb39f2762a5827d692108d10137407e4651d825d
8d2e4c98fbb6a724f220cba6f6296d2b59488611

Thanks for reporting, @prtv :)
[Fix #54] Do not enable Flycheck mode with Tramp
Extract test into separate function
Re-work resource handling in tests

Work around load-file-name only being defined during the actual loading
of a file in Emacs 24.2
Improve file name comparison

Resolve symlinks before file name comparison.
Merge branch 'master' into unit-tests

* master:
  Improve file name comparison
  Extract test into separate function
  [Fix #54] Do not enable Flycheck mode with Tramp
  Restore compatibility with stable Emacs 24.2
  Fix assignment to free variable warning