Remove empty path elements when constructing modname
Remove empty path elements when constructing modname

Without this, autohelp fails if you don't put a trailing slash on
the input directory name.

Change-Id: I6c37636c87ad86f93d1fd7121461ce543a6260b3

openstack/openstack-doc-tools,savinash47/openstack-doc-tools,savinash47/openstack-doc-tools,savinash47/openstack-doc-tools,openstack/openstack-doc-tools