added new functions and error checking

- now checks if cachd_dir is actualy a dir
- cached function returns list of cached keys/hosts
- now stats file to se if it has 'expired'

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
fixed bug in contains, added keys and validate_key methods
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>