Use fnamemodify instead of split hackery

Simpler and faster