Fix store magic test 

On MacOSX the temp dir in /var is symlinked into /private/var thus making this comparison fail. This pull request fixes the issue by using ```os.path.realpath``` to expand the tempdir into the real directory.