[FAB-5427] Fixes TestNewUserRegistryMySQL on vagrant
[FAB-5427] Fixes TestNewUserRegistryMySQL on vagrant

This change copies the input file to a local volume before
trying to change its access mode so that it can effectively
be set to 000.

With this change the test passes:

$ go test -v -run TestNewUserRegistryMySQL
=== RUN   TestNewUserRegistryMySQL
2017-07-21 22:22:29.463 UTC [bccsp] GetDefault -> WARN 001 Before using BCCSP, please call InitFactories(). Falling back to bootBCCSP.
--- PASS: TestNewUserRegistryMySQL (0.00s)
PASS
ok      github.com/hyperledger/fabric-ca/lib    0.012s

Patch-set #2, 3, 4: rebase
Patch-set #5: Addressed Keith's comments (better handling of error cases)
Patch-set #6: added missing change

Change-Id: I670ea08aaf2f9c0c4f9cf960ff23fd7326065dc3
Signed-off-by: Arnaud J Le Hors <336b2f4fb14e0a6aba0291ba81894e387297584e@us.ibm.com>

saadk10/fabric-ca,saadk10/fabric-ca