<pre>
>>> os.path.join('/a/b','')
'/a/b/'
</pre>
but we want '/a/b'; hence the if..