Fix leading '/' detection and removal