Fix bug caused by empty path var.

This resolves the issue from the other pull request.
os.path.join will simply ignore the empty path.