added mean and median length, and fixed average calculation section
possibly sampleid cannot be found, if statement required
fixed error message style
fully refactorred metadata addition, not using external object producing
fixed paired read processing