Added lock file writing and checking. CURA-2449
Added lock file writing and checking. CURA-2449

Curahelper/Cura,fieldOfView/Cura,Curahelper/Cura,fieldOfView/Cura,ynotstartups/Wanhao,hmflash/Cura,hmflash/Cura,ynotstartups/Wanhao