Fix prefix creation and add path validation to ZK mock