Ah you're right -- this whole function should only be called on path strings anyway.
Nevermind my previous comments