[porenetwork][util] Fix trimming of porenetwork in extraction script Closes #1295 See merge request !3632