remove white spaces on some empty lines
Gess temp dirname using path.basemane instead of regexp