A better fix.

Merging together https://github.com/silverstripe-labs/silverstripe-secureassets/pull/6 and https://github.com/silverstripe-labs/silverstripe-secureassets/pull/4