this is a simple example of how to check write access for a file/directory from a Go program.