I wonder if we could use https://doc.rust-lang.org/std/env/fn.current_exe.html to locate the target directory greatly simplifying target_dir.rs