Simplify logic, add topdir to path.join