Added test, fixed bug with lack of str()

Tests for file creation and num lines is correct
Slightly unsure how to handle file handles being passed in, not paths
Merge branch 'addtped'

Work done, added test