Replaced split with shlex.split
Amended the file path derivation from permalink so it handles paths which end in a file extension