Ticket 53: REST Api & Console Test use file.write too often

Change-Id: I7a24d9b68af37218e48d0c716192d32cdc286cb0
Reviewed-on: http://naan.mimuw.edu.pl:8001/127
Tested-by: Nebulostore Nebulostore <nebulostore@gmail.com>
Reviewed-by: Krzysztof Rzadca <krzadca@mimuw.edu.pl>