simplify system call and prevent command injection
Merge pull request #149 from zendesk/grosser/tempfile

simplify system call and prevent command injection