SHDP-375 Adding fix for unparseable numeric parts

- Now catching exceptions if numeric parts in
  a filename can't be parsed as integer.
- Some tests to verify this.