slight refactors & first test

- Refactored logic for resource loading into a module function so that contexts are easier to deal with
- first test for Singularity::Dsl#task_name