Implement directory and extension ignore from PHP version. Closes #17