rustc`s -o command line option takes a filename but only uses the directory when creating libraries. This is surprising behavior that we should fix. Not sure if there are other issues on this subject.