macros.pl: be a bit more careful with open()