always use realpath of file
Merge pull request #803 from airbone42/master