Initialisation of communication between server and virtual client is working

Additional changes
- Created procedures to make the code of main more clear
- Found a problem on my distro. MKFIFO creates named pipes with auth code 411 which is annoying because a client who whishes to connect needs 700.
    -> Forced chmod to solve the problem.