Fix #1057 Add tests to check validity of an export filename