Implemented prototypical JSON response for GET parameter ?dir=json

Just an idea, how an JSON directory response can be implemented. If you like it, feel free to merge!