rewrite saveHLSToPlaylist
Merge pull request #74 from ingwinlu/improve_playlist_generator

rewrite saveHLSToPlaylist (code speed optimization) - ingwinlu