Check chardet availability before using it

The use of chardet python library is quite useful in order to detect character encodings, but it's not installed in all systems by default. So, it's a good practice to check its availability before using it.

This pull request enhances #7
Merge pull request #8 from dgilm/patch-5

Check chardet availability before using it