Support for FreeBSD

We update the scripts to use `/bin/sh` instead of bash.  Also, a
small update to `CMakeLists.txt` is included for making debugging
a little easier.
Support the Tilera platform

This patch provides build and test script updates for the Tilera
platform.  The cmake scripts autodetect if you are configuring on a
system with a Tilera MDE installed, so you can use the normal `cmake`
command in a build directory with standard cmake options.  Note that
we turn off building the documentation on Tilera, even if Sphinx is
installed.

The major modification to our standard workflow is testing: replace
`make test` with `./tile-test`.  This assumes there is a working
connection to a Tilera device.

Installation requires sudo access, i.e., `sudo make install`. If you
intend to use these files regularly, then you should use an installation
prefix that includes `$TILERA_ROOT/tile`.  One good example is
`$TILERA_ROOT/tile/usr/local`, but you can use any directory you want
that is supported by the various `tile-monitor` upload and mount options.
Path manipulation functions

This patch adds several functions for manipulating paths into the local
filesystem.  It's largely modeled after Python's `os.path` module.
Paths do not have to refer to existing files or directories, and we
don't (yet) do any normalization of the paths.
File and directories

This patch adds a new `cork_file` type to represent a file or directory
in the local filesystem.  Its API is modeled on combination of the Java
`File` class and the Python `os` and `os.path` modules.

We currently have several functions that operate on files.  One tests
whether a file exists, and if so, whether its a file, directory, or
symlink.  One removes a file or directory, and optionally its contents.
One creates a new directory, and optionally its parents.
Lists of paths

This patch adds several functions for working with lists of paths,
including a constructor function that parses a colon-separated path list
encoded as a single string.
Finding a file within a list of paths

This patch adds functions that searches a list of paths for a file.  The
file to search for is specified by path that's relative to each of the
paths in the list.  Once function returns a `cork_file` instance for the
first file that exists, the other returns a file list containing all of
the files that exist.
Accessor functions for standard paths

This patch adds functions that return paths or path lists containing the
standard paths defined by the XDG Base Directory Specification.
Merge branch 'feature/files-dirs' into develop

* feature/files-dirs:
  Accessor functions for standard paths
  Finding a file within a list of paths
  Lists of paths
  File and directories
  Path manipulation functions
cork_path_set

This patch adds a function that lets you update the content of a path
object.  (Paths have always been mutable, so that was a pretty glaring
omission...)
Fix undefined value access in cork_strndup

The `cork_strndup` function lets you duplicate a string that you provide
the length of (as opposed to `cork_strdup` which uses `strlen` to
calculate the length of the string).  That means that the string to be
copied doesn't need to be NUL-terminated.  However, when actually
performing the copy, we were assuming that it is NUL-terminated, giving
us an undefined value access error in valgrind.
Merge branch 'feature/freebsd' into c-template

* feature/freebsd:
  Support for FreeBSD
Merge remote-tracking branch 'template/c-template' into feature/tilera
Merge branch 'feature/tilera' into develop

* feature/tilera:
  Support the Tilera platform
  Support for FreeBSD