Fix C++ reflection so that -p works.

The C++ reflection code was missing support for the -p option, which allows
the developer to place the .cpp/.h files into a different directory than the
bitcode. It was also missing directory creation (and path separators) for that
option.

Change-Id: I5b16a6d109c6df8ca3e1542e0c5345691037bf85
(cherry picked from commit c7888b0c7c648b8e3987d9ff277e10e0551e203b)
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1