Fix dirname code for toplevel modules
v0.022

          Fix dirname code for toplevel XS modules