More robust path handling.

The final slash does not matter anymore.