fixed client to accept arbitrary directory