Fix directory browsing (..)

Does now leave out the trailing slash in the 'dir' parameter and
properly follows the '..' directory one level up. Fixes issue #1