Add a right-trim function to allow the Dependency constructor to resolve symlink paths with trailing spaces correctly.