Handle null and empty paths the same as /

This prevents a NPE when working with the java servlet API, which
returns a null path for requests to the context root (e.g. POST /wd/hub)