fix trash bin expire operation and add unit tests

add unit tests for expire operation.
[OPTIONAL]
Calling this argument $maxFileAge would have been clearer.
Now I need to re-read the comment multiple times to find out what "retention obligation" means.