Common functionality shared across grunt-amd tasks