Made the library compatible with go tools

Moved each example into its own directory.