We forgot to do so in commit d827768c0. In order to avoid the same mistake in the future, we're extracting a method to get these attributes. We're also adding tests, since we didn't have any tests to check that the `dir` attribute was properly set.
d827768c0