Fix potential ambiguity in the add command
Extract the relative path method to a helper
Fix a bug in the add command

When NOT in the project root, the add command failed