Output correct dependency file with only output dir

There are three ways aidl can decide on the path to write
generated java:
  - A literal output path
  - Writing output next to the input (no output directory given)
  - Writing output to an output directory

Fix a bug where we were writing an incorrect dependency file in the
last case, where we are given an output directory, but no output path.

Bug: 28091660
Change-Id: I7fa743c6f32292e44439b7dc3ce7e49421b93d05
Test: added a unittest
3 files changed