Add CLI support, fix remove accents, fix basename PHP bug