chmod fully working

I tested around and everything seems to be working now. I also added in
the ability to double click in the connections menu to connect to a
directory.