fix issue with passing filepath to exec command

- escape whitespace, etc.
- also fix issue with defvar of test path