rewrite ftdetect to support #!py(dsl|objects)

There might be a better way of doing this, but this works for me at least.