Set mode to 'test' so we can use a custom templates dir