Fixed permissions effecting tests and fixed datetime validation