Refactored the various write_csv functions into one
Merge branch 'dev_active' of https://github.com/SimonStreicher/LoopRank into dev_active