improve script to parse thorium profiles

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>