Rewrite saveToFile and writeToStream to use common code
Install flvtool2 on travis
Use bigger file and timeouts for time-based tests