Added BSD license.

Added the BSD license as a separate file and in the appropriate .erl files.