Gregory Gaultier weathered some early difficulties before reaching the PSA Masters squash final by defeating Egypt's Mohamed El Shorbagy.