Fixed small bugs related to separate_directory and java.program