Add checking for tmpdir length

The only case for empty tmpdir is system tmp is empty