Make temp attribute more solid and add unit test on regression

Signed-off-by: Julien Danjou <julien@danjou.info>