Why not pass a default `target_dir` of './' or `Dir.pwd` rather than checking if nil, then always do this step.