use provided target_dir

fixing #24