first go at using a tmp dir and mkdir -p

just as before create everything under `/tmp` and use `mkdir -p` -- no heredocs just yet
using heredocs now
Merge pull request #9 from liviutudor/Liv_using_heredocs

Liv using heredocs