Update Aho-Corasick.cpp

Adding some checks to ensure algorithm works fine even if the signature format wasn't as expected.