more work on the server part
added readdir functionality and added some more processing to the main reft script