This removes a lot of duplicate handling & validation of path names in favour of having a single source of this logic. It also relocates a couple of instances of similar but separate logic to being alongside each other within the utils file so that even though they can't share code, they are at least defined next to each other.
Alongside doing this, we also fix some warnings from Python due to the regexes not being marked as raw strings (such that '\d' was previously trying to be an escape at the string parsing level, rather than a regex escape).
This removes a lot of duplicate handling & validation of path names in favour of having a single source of this logic. It also relocates a couple of instances of similar but separate logic to being alongside each other within the utils file so that even though they can't share code, they are at least defined next to each other.
Alongside doing this, we also fix some warnings from Python due to the regexes not being marked as raw strings (such that '\d' was previously trying to be an escape at the string parsing level, rather than a regex escape).
Builds on https://github.com/srobo/srawn/pull/78.