Fixed port_register bug

forward slashes are now escaped correctly

This fixes bug #234