Fixed files.update API.
Added first batch of tests for files module.