DRY up the composer binary download code a bit

This is just some code refactor of the `download_composer` `exec` resource. Trying not to repeat the exec resource.