Added a CMake extention for determining if a directory is write-able
by the build system. To determine this, we attempt to 'touch' a file
in the directory and check the return code of this command.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>