Fix posts file detection and re-generation

ignore filename start with .