Update rule reading and saving, and add option to specify package file.

Removed the translate() methods, they didnt make any sense and they were
actually using an invalid syntax(old version?)

Implemented the --pkg-file argument and with that made modifications to
the PKG_FILE variable to accomodate for the new change.

Added two functions, read_rules() and save_rules() both do as their
names say writing and reading rules from the package file after
detecting what hierachy we are working with.

Updated the directory_to_file() and file_to_directory() functions to use
the new read_rules() and save_rules() functions.
Handle exceptions when writing temp files.

IOError and OSError are handled when trying to write temp files in
file_to_directory() and directory_to_file() functions.

pkg_type is detected if the user gives the full path example:
`/etc/portage/package.license` will detect license as the pkg_type
without specifying.
--type will act as an override to automatic detection.

Since package type is detected automatically using the extension, the
--type switch will be used to override this detection, as a result
args.pkg_type no longer has a default value.