Fix bug where link commands ignored repo arguments
Fix bug with using bad link paths because sys.argv[0] not guaranteed to be full path