Fix open pragma overriding explicitly passed layers

When using autodie, the open pragma overrides any layers specified in open's second parameter.  This fixes that issue.  It includes the test from #52.