Applied base path for sample code in Discovery and distribution

@ianbarber can you confirm that these changes are what you expected?