make sure abspath is used when looking for target_dir