RF: refactor SPM batch script for study params

Allow passing of study and analysis parameter dictionaries.