Add script dir attribute