Remove debug prints.

Change-Id: I829b2cae7febde7dbc1e0b8a44f36a783d86191a
Move test logic into a function for re-use.

Change-Id: I29ad81ee0f15a969a3d7d89b644b8044af4fd1da
Fix #2072: Escape project names in clone urls.

This ensures that the url is valid to use when cloning the project,
as well as ensuring that project names can't be engineered to break
the IDE.

Change-Id: Ic33e537bee2f66bb2750ee4daab39ee1faafdf22