Extract contents: improve handling of other script types

refs #5751