First tries /tmp for rebuild temp file, then log folder

Signed-off-by: nixnodes <code@eth.si>