Fix bug in parsing single directory
Add license file