scripts: fixes and tools for lab tests

Change-Id: Iee589f110fd9d7558656f21567cbd31b9de0fec4
Reviewed-on: http://naan.mimuw.edu.pl:8001/77
Tested-by: Nebulostore Nebulostore <nebulostore@gmail.com>
Reviewed-by: Bolek Kulbabinski <bkulbabinski@gmail.com>