app: fix tests

Adapting to the new fs/testing behavior.
provision/local: use the proper method for writing

Open will open a file in read-only mode. The recent change to fs/testing
exposed this bug.
provision/local: use Create instead of Open to write file

Fixing the build...
api: fix tests (and the build)