Improve remote compilation

Add support of subfolders to remote compilation system.