added permission check on log and tmp directory

Signed-off-by: Steven Koeberich <skoeberich@nrecom.net>