fix assetsDir option and add tests

assetsDir was being prepended to an absolute path and was not tested.
This adds tests and appends the relative path of the asset to assetsDir.