capture output of readfile
make temp dir configurable
add tests for container
fix file permissions