[enh] simplified string emptyness check
[fix] avoid exception in getpkeys if directory doesn't exist
[fix] avoid exception in getskeys if directory doesn't exist
[enh] use set instead of list in getskeys
[enh] extracted methods get_{p,s}k_dir
[enh] use 'is not' to test against None instead of !=
[enh] added test suite
Merge pull request #2 from dnet/master

improvements, fixes, test suite