fix(library): check dir before writing outState

Check whether mSelectedDir was set before saving the directory in
onSaveInstanceState in case that the fragment is detached very quickly.

Fix #20
Merge pull request #24 from passy/issue-20

fix(library): check dir before writing outState