Updated to pad the last array buffer and write to the chrome filesystem
api