gvarsanyi/sync-exec — pull request #1 by typicode (2014-04-08 05:49:03+00:00)
Title: Fix undefined var

Hi,
Just tried sync-exec and got an error: `tmp` var is undefined.
So I replaced it with `dir` and added a regexp to remove trailing slash.