Correct bug in add_to_*_path

Add unit tests for these functions.