bit of a hack to ensure that dsl-created arrayrefs etc are definitely arrays.
fixed tests in preceding commit.
Added ref checking on upgraded prototypes
Changes updated (fixed gh #39)
Perltidy