Use codecs.open() instead of open() for backwards compatibility.

older versions of python did not support the encoding argument in the
open() function but the codecs module version of open() did so thats
what we're using. Also updated other open() calls to specify the
encoding argument.
Update command-line args help messages.

Updated help message for cmd line args to reflect recent changes, Also
removed the python shebang from emod module script and removed the
ifmain block.
Rename emod.py to core.py

First step into splitting up the script into multiple modules.
Create Package class.

Created a Package() class that holds all of the package info and
describes it, i have modified the save_rules() and read_rules() to work
as methods for this class.

I did away with the seperate file_to_directory() and directory_to_file()
functions and instead now we have a a convert() method, it makes more
sense this way since there are only 2 package style so no need to
specify which one we need to convert to each time.

the convert method by itself only changes the Package.style variable
and and renames the package file, after which save_rules takes care of
the rest.

I have removed the author, email and date fields as they belong
somewhere else but kept the version and added a -v/--version
command-line argument that prints out the program name and its version.

Moved all testing files to the testing branch.
Small tweaks to type and style detection.
Add color_diff() function.

Added a new function to print a nice a diff output of the rule after it
changes, new flags are highlighter in green, deleted flags are
highlighted in red.
Update command line handling.

Rearranged a how command line arguments are handled and interepreted and
added a bit of logic to it. Now you can use --convert without having to
specify an atom, and by specifying an atom but no flags the script will
output information about the given atom.