quick fix for #3881
Merge pull request #3882 from ivanov/fix-3881

use realpath in temporary working dir test

avoids false failures when temp is symlinked (OS X).